require.config({
  paths: {
      echarts: '/static/evaluate/js/echarts/dist'
    }
  });    
// 使用
require(
  [
    'echarts',
    'echarts/chart/pie', // 使用柱状图就加载bar模块，按需加载
    'echarts/chart/funnel',
    'echarts/chart/line',
    'echarts/chart/bar',
    'echarts/chart/wordCloud'
  ],
  function (ec) {
    // 基于准备好的dom，初始化echarts图表
    var totality_pie = ec.init(document.getElementById('totality_pie')); 
    var totality_bar = ec.init(document.getElementById('totality_bar')); 
    // var totality_hot = ec.init(document.getElementById('totality_hot')); 
    var key10='总体饼图';
    var key11='总体往年对比';
    var key12='总体热词';
    $('#dataMessage').modal('show');
    $.ajax({
      type: "POST",
      url:ajaxUrl,
      dataType: "json",
      success: function(data){
         $('#dataMessage').modal('hide');
        totality_pie.setOption(data[''+key10+'']); 
        totality_bar.setOption(data[''+key11+'']);
        // totality_hot.setOption(data[''+key12+'']);
      },
      error:function(){                        
      }
    });         // myChart.setOption(option); 
  }      
);
